/ Assembly List / LJCTextDataReaderLib / TextDataReader / LJCReadLine

Namespace - LJCTextDataReaderLib


Returns

True if read successfully, otherwise false.

Syntax

C#
public Boolean LJCReadLine()

Reads the next line from the line string array. (DE)

Remarks

This is used to read a line from the string array that was loaded with the LJCSetLines() method.

Example

C#
using LJCTextDataReaderLib;

// The hasHeadingLine defaults to true if the parameter is not included.
TextDataReader textReader = new TextDataReader();

string[] lines = new string[]
{
  "FirstName, LastName",
  "John, Doe",
  "Jane, Doe"
};

// The field delimiter defaults to "," if the parameter is not included.
textReader.LJCSetLines(lines);

while(textReader.ReadLine())
{
  // Get the current line values as strings.
  for int index = 0; index < textReader.FieldCount; index++)
  {
    string data = textReader.GetString(index);
  }
}

Copyright © Lester J. Clark and Contributors.
Licensed under the MIT License.